<%@page import="org.apache.jasper.tagplugins.jstl.ForEach"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="curriculos.negocio.Curriculo, java.util.List" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Sistema de Curriculos Online</title>
</head>
<body>
<h3>Sistema de Curriculos Online</h3>
<hr/>
<% String msg = (String) request.getAttribute("msg"); 
   if (msg != null) { %>
   	<center><font color="blue"><%= msg %></font></center>
<% } %>

<% List<Curriculo> curriculos = (List<Curriculo>) request.getAttribute("curriculos"); %>
<table border="1">
	<tr>
		<th>Nome</th>
		<th>E-mail</th>
		<th>Formação</th>
	</tr>
<% 	if (curriculos != null) {
		for(Curriculo c : curriculos) { %>
	<tr>
		<th><%= c.getNome() %></th>
		<th><%= c.geteMail() %></th>
		<th><%= c.getFormacao() %></th>
	</tr>
<% 		}
	} else { 
		out.println("<h4>A lista de curriculos está chegando vazia</h4>");
	}%>	
</table>
<hr/>
<a href="cadastro.jsp">Faça o seu cadastro</a> | <a href="login.jsp">Efetue o seu login</a>
</body>
</html>